#include "travls.h"


Coord::Coord()
{
	x=rand() % (MAP_SIZE_X ) +1;
	y=rand() % (MAP_SIZE_Y ) +1;
}
Coord::Coord(int x, int y)
{
	this->x=x;
	this->y=y;
}
double Coord::distance(Coord c)
{
	//distance formula
	return sqrt( pow((c.x - this->x),2.0) +pow((c.y - this->y),2.0) );
}
bool Coord::operator==(const Coord& c)
{
	return( (c.x == this->x) && (c.y == this->y));
}
